<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    这是购物车页面
</body>
<script>
    
    const token = sessionStorage.getItem("isLogin") ? JSON.parse(sessionStorage.getItem("isLogin")) : {};

    if(token.code !== "OK"){
        if(confirm("没有登录不允许打开购物车页面，是否去登录")){
            location.href = "./login.html"
        }else{
            location.href = "./index.html"
        }
    }

</script>
</html>